#ifndef _CAN_H_
#define _CAN_H_
#include "stm32f10x.h"

extern CAN_InitTypeDef        CAN_InitStructure;

extern CanRxMsg RxMessage;
extern CanTxMsg CAN1_TxMessage[8];
extern CanTxMsg CAN2_TxMessage[8];	

extern uint16_t	CAN1_TXPointer;		
extern uint16_t	CAN2_TXPointer;	

extern uint16_t	CAN1_AircdRxResetTime1;
extern uint16_t	CAN1_AircdRxResetTime2;
extern uint16_t	CAN1_AircdRxResetTime3;

extern uint16_t	CAN2_AircdRxResetTime1;

void CAN1_Config(FunctionalState NewState);
void CAN1_FilterConfig(void);
void CAN1_GPIOConfig(void);

void CAN2_Config(FunctionalState NewState);
void CAN2_FilterConfig(void);
void CAN2_GPIOConfig(void);

void CAN1_RXDataAPP(void);
void CAN1_TXPackage(void);
void CAN1_PDO1Package(CanTxMsg *TxMessage);
void CAN1_PDO2Package(CanTxMsg *TxMessage);
void CAN1_PDO3Package(CanTxMsg *TxMessage);
void CAN1_PDWatchPackage(CanTxMsg *TxMessage);

void CAN2_RXDataAPP(void);
void CAN2_TXPackage(void);
void CAN2_PDO1Package(CanTxMsg *TxMessage);
void CAN2_PDWatchPackage(CanTxMsg *TxMessage);
#endif


